#ifndef __RENDER_HPP__
#define __RENDER_HPP__

#include "GL/glew.h"
#include "glm.hpp"
typedef unsigned char mb;

#define ASSERT(x) if(!(x))__debugbreak()

#define GLCall(x)\
    GLClearError();\
    x;\
    ASSERT(GLLogCall( #x, __FILE__, __LINE__ ) )


void GLClearError();
mb GLLogCall( char const* function, char const* file, int line );


class VertexArray;
class IndexBuffer;
class Shader;

class Renderer {
public:
    void clean();
    void draw( VertexArray const& va, IndexBuffer const& ib, Shader const& shader );
};
//
//
//class Renderer {
//public:
//    static void init();
//    static void shutdown();
//    static void begin();
//
//    static void end();
//
//    static void flush();
//
//    static void drawQuad( glm::vec2 const& position, glm::vec2 const& size, glm::vec4 const& color );
//    static void drawQuad( glm::vec2 const& position, glm::vec2 const& size, unsigned int textureID );
//
//    struct Stats {
//        unsigned int drawCount = 0;
//        unsigned int quadCount = 0;
//    };
//
//    static Stats& getStats();
//    static void rersetStats();
//};



#endif // !__RENDER_HPP__
